import request from '@/utils/request'
import apiConfig from '@/api/config'
import { useUserStore } from '@/pinia/modules/user'
import FileSaver from 'file-saver'
// import qs from 'qs'

// 老年人口统计
export const get_elder_analysis = params => {
  return request({
    url: `${apiConfig.businessApi}/app-elder-analysis/elder`,
    method: 'get',
    params
  })
}

// 老年人区域分布情况
export const get_elder_area = params => {
  return request({
    url: `${apiConfig.businessApi}/app-elder-analysis/elder-area`,
    method: 'get',
    params
  })
}

// 养老机构统计
export const get_pension_analysis = params => {
  return request({
    url: `${apiConfig.businessApi}/app-pension-analysis/pension`,
    method: 'get',
    params
  })
}

// 养老机构区域分布情况
export const get_pension_area = params => {
  return request({
    url: `${apiConfig.businessApi}/app-pension-analysis/pension-area`,
    method: 'get',
    params
  })
}

// 养老补贴金额统计
export const get_subsidy_analysis = params => {
  return request({
    url: `${apiConfig.businessApi}/app-subsidy-analysis/subsidy`,
    method: 'get',
    params
  })
}

// 养老补贴金额区域情况统计
export const get_subsidy_area = params => {
  return request({
    url: `${apiConfig.businessApi}/app-subsidy-analysis/subsidy-area`,
    method: 'get',
    params
  })
}

// 从业人员统计
export const get_personnel_analysis = params => {
  return request({
    url: `${apiConfig.businessApi}/app-personnel-analysis/personnel`,
    method: 'get',
    params
  })
}

// 从业人员区域情况统计
export const get_personnel_area = params => {
  return request({
    url: `${apiConfig.businessApi}/app-personnel-analysis/personnel-area`,
    method: 'get',
    params
  })
}

// 项目规模统计
export const get_fund_analysis = params => {
  return request({
    url: `${apiConfig.businessApi}/app-fund-analysis/fund`,
    method: 'get',
    params
  })
}

// 项目规模区域情况统计
export const get_fund_area = params => {
  return request({
    url: `${apiConfig.businessApi}/app-fund-analysis/fund-area`,
    method: 'get',
    params
  })
}

// 专业人才统计
export const get_expert_analysis = params => {
  return request({
    url: `${apiConfig.businessApi}/app-expert-analysis/expert`,
    method: 'get',
    params
  })
}

// 专业人才区域情况统计
export const get_expert_area = params => {
  return request({
    url: `${apiConfig.businessApi}/app-expert-analysis/expert-area`,
    method: 'get',
    params
  })
}
